package com.ruoyi.caigou.service;

import com.ruoyi.common.core.web.domain.AjaxResult;
import com.ruoyi.system.api.domain.caigou.BuyBackReq;
import com.ruoyi.system.api.domain.caigou.BuyBackReqDetail;

import java.util.List;

/**
 * 采购退货申请单Service接口
 *
 * @author wl
 * @date 2024-10-28
 */
public interface IBuyBackReqService {
    /**
     * 查询采购退货申请单
     *
     * @param id 采购退货申请单主键
     * @return 采购退货申请单
     */
    public BuyBackReq selectBuyBackReqById(Integer id);

    /**
     * 查询采购退货申请单列表
     *
     * @param buyBackReq 采购退货申请单
     * @return 采购退货申请单集合
     */
    public List<BuyBackReq> selectBuyBackReqList(BuyBackReq buyBackReq);

    /**
     * 新增采购退货申请单
     *
     * @param buyBackReq 采购退货申请单
     * @return 结果
     */
    public AjaxResult insertBuyBackReq(BuyBackReq buyBackReq);

    /**
     * 修改采购退货申请单
     *
     * @param buyBackReq 采购退货申请单
     * @return 结果
     */
    public AjaxResult updateBuyBackReq(BuyBackReq buyBackReq);

    /**
     * 批量删除采购退货申请单
     *
     * @param ids 需要删除的采购退货申请单主键集合
     * @return 结果
     */
    public AjaxResult deleteBuyBackReqByIds(Integer[] ids);

    /**
     * 删除采购退货申请单信息
     *
     * @param id 采购退货申请单主键
     * @return 结果
     */
    public AjaxResult deleteBuyBackReqById(Integer id);

    AjaxResult updateStatusByCode(BuyBackReq buyBackReq);

    BuyBackReq selectBuyBackReqByCode(String code);

    List<BuyBackReqDetail> selectBuyBackReqDetailListByBuyBackReqId(Integer buyBackReqId);
}
